create  table jms_dm.dm_repair_access_detail_dt 
(
scan_network_code        varchar(100) COMMENT '维修点编码' ,
scan_network_name        varchar(100) COMMENT '维修点名称' ,
rfid                     varchar(100) COMMENT 'rfid' ,
material_type            varchar(100) COMMENT '物料类别' ,
warehouse_type           varchar(100) COMMENT '物料类型' ,
scan_time                timestamp COMMENT '创建时间' ,
 is_damage     varchar(100) COMMENT '是否仲裁' ,
damage_type       varchar(100) COMMENT '仲裁类型' ,
dw_operate  decimal(16,4) COMMENT '是否有后续操作' ,
 varchar(100) COMMENT '' ,
  up_scan_type_code      varchar(100) COMMENT '上一站扫描类型' ,
  up_scan_type_name      varchar(100) COMMENT '上一站扫描类型code' ,
  up_scan_time           timestamp COMMENT '上一站扫描时间' ,
  up_scan_network_code   varchar(100) COMMENT '上一站扫描网点code' ,
  up_scan_network_name   varchar(100) COMMENT '上一站扫描网点' ,
 varchar(100) COMMENT '' ,
 dw_scan_type_code       varchar(100) COMMENT '下一站扫描类型' ,
 dw_scan_type_name       varchar(100) COMMENT '下一站扫描类型code' ,
 dw_scan_time            timestamp COMMENT '下一站扫描时间' ,
 dw_scan_network_code    varchar(100) COMMENT '下一站扫描网点code' ,
 dw_scan_network_name    varchar(100) COMMENT '下一站扫描网点' ,
 varchar(100) COMMENT '' ,
scan_type_code    varchar(100) COMMENT '出入库类型,07维修入库,11注销,34维修出库' ,
date_time timestamp COMMENT '' )
ENGINE=OLAP
DUPLICATE KEY(填写key)
comment 'insert overwrite table jms_dm.dm_repair_access_detail_dt partition (dt)'
PARTITION BY RANGE (date_time) ( 
   START ("2023-09-11") END ("2023-11-10") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(site_code) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);